Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Fix wrong offset in send callback #335

Merged

Conversation

BewareMyPower
Copy link
Collaborator

This PR is a partial fix of #332.

Before this PR, the MessagePublishContext completed with the current offset, which is the latest offset. Then PartitionResponse will be filled with the offset. However, Kafka producer treat the PartitionResponse's offset as the base offset.

For example, before this PR, when Kafka producer sends a batch with 3 single messages to a new topic, the offsets in send callback will be (2, 3, 4) before this PR. After this PR, the offsets in send callback will be (0, 1, 2).

@jiazhai jiazhai merged commit a3cb3fb into streamnative:master Jan 20, 2021
@BewareMyPower BewareMyPower deleted the bewaremypower/fix-send-callback branch January 20, 2021 01:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants